/**
 * Created with CLion.
 * Description: 
 * User: loong
 * Date: 2025/6/18
 * Time: 22:20
 */

#ifndef SPAWNER_H
#define SPAWNER_H
#include "core/Object.h"

class Player;
class Spawner : public Object
{
public:
    void Update(float _dt) override;

    int  GetNum() const { return num_; }
    void SetNum(int _num) { num_ = _num; }

    float GetTimer() const { return timer_; }
    void  SetTimer(float _timer) { timer_ = _timer; }

    float GetInterval() const { return interval_; }
    void  SetInterval(float _interval) { interval_ = _interval; }

    Player * GetTarget() const { return target_; }
    void     SetTarget(Player * _target) { target_ = _target; }

protected:
    int      num_ {20};
    float    timer_ {0};
    float    interval_ {3.0f};
    Player * target_ {nullptr};
};

#endif//SPAWNER_H
